package net.xiduth.game.player.controlers;

import net.xiduth.game.WorldObject;

/**
 * 
 * @author Jae <jae@xiduth.com>
 * 
 * Last modified: <Oct 18, 2013>
 *
 */
public class AntiDupeControler extends Controler {
		
	@Override
	public void start() {
		player.sm("<col=ff0000>The server is updating, you have been removed from the Dungeoneering game.</col>");
	}
	
	@Override
	public boolean logout() {
		player.sm("You won't be able to log out until the server is finished updating!");
		player.tryAnti();
		return false;
	}
	
	@Override
	public boolean processObjectClick1(final WorldObject object) {
		if (object.getId() == 48496) {
			player.getDialogueManager().startDialogue("SimpleMessage", "The server is updating, please wait.");
			player.sm("Function disabled.");
			return false;
		}
		return true;
	}
	
	@Override
	public void magicTeleported(int type) {
		player.getControlerManager().startControler("AntiDupe");
	}

}
